package ratelimit

import (
	"gateway"
	"gateway/core"
)

type RateLimit struct {
}

func (RateLimit RateLimit) Call(context core.GatewayContext) {

	/**
	暂时返回成功,后续可直连redis或者通过rpc调用实现.
	*/
	context.Response.Success = gateway.Success_Code
	context.Response.Msg = gateway.Success_Msg

}

func (RateLimit RateLimit) GetName() string {

	return gateway.Pipe_RateLimit
}

func init() {
	core.GetInstance().Register(gateway.Pipe_RateLimit, RateLimit{})
}
